/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#ifndef __INPUT_HARD_DIRECTX8_CREATOR_H__
#define __INPUT_HARD_DIRECTX8_CREATOR_H__

#include "Joystick.h"
#include "Mouse.h"
#include <NoCopy.h>
#include <input/Manager.h>
#include <win32/win32.h>
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <threads/Thread.h>
#include <WindowCreator.h>

namespace liba
{
namespace input
{
namespace hard
{
namespace directx8
{

class Creator : 
	 private threads::Thread,
	 private threads::Mutex,
	 virtual input::Manager::Creator,
	 virtual public WindowCreator
{
	IDirectInput8 * DI;
	std::vector<Joystick *> joysticks;
	std::vector<Mouse *> mouses;

    virtual void run();
public:
	Creator(bool init_mouse = true, bool init_joystick = true); 
	virtual ~Creator();
};

} // namespace directx8
} // namespace hard
} // namespace input
} // namespace liba
using namespace liba;

#endif //__INPUT_HARD_DIRECTX8_CREATOR_H__